//
//  NewsAdvCell.m
//  suRead
//
//  Created by 李 诗洋 on 15/12/29.
//  Copyright © 2015年 bao. All rights reserved.
//

#import "NewsAdvCell.h"
#import "UIImageView+WebCache.h"
#import "M_News.h"

@interface NewsAdvCell()
@property (strong, nonatomic) IBOutlet UIImageView *advImageView;

@end

@implementation NewsAdvCell

- (void)awakeFromNib {
    // Initialization code
    [super awakeFromNib];
    if ( [[[UIDevice currentDevice]systemVersion] floatValue] >= 8.0) {
        self.layoutMargins = UIEdgeInsetsZero;
        self.preservesSuperviewLayoutMargins = NO;
        self.separatorInset = UIEdgeInsetsMake(0, 15.0f, 0, 15.0f);
    }
}

- (void)setNewsData:(M_News *)newsData
{
    NSString *imageURL = newsData.f_thumbnail;
    [self.advImageView sd_setImageWithURL:[NSURL URLWithString:imageURL] placeholderImage:[UIImage imageNamed:@"lazy"]];
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

}

@end
